import request from '@/utils/request'

export default {
    getAllTeacher(tacherModel) {  //获取列表教师信息 以及搜索学生信息
        return request({
            url: `/teacher/getTeachers/${tacherModel.pageNo}/${tacherModel.pageSize}`,
            method: 'get',
            params: {
                name: tacherModel.name,
                zhicheng: tacherModel.value,
                           
            }
        });
    },
    addTeacher(teacher) {  //添加学生用户
        return request({
            url: "/teacher/saveOrUpdateTeacher",
            method: 'post',
            data: teacher
        });
    },
    getById(tno) {    // 通过学生id 进行回显
        return request({
            url: `/teacher/getById/${tno}`,
            method: 'get',
        });
    },
    deleteById(id) {  // 通过id 删除学生信息
        return request({
            url: `/teacher/${id}`,
            method: 'delete',
            // data: student
        });
    },
    getteachercount(){
        return request({
            url: '/teacher/countallteacher',
            method: 'get'
            
    
        })
      } 
    // countallteacher


}